/* 2011/8/1 */
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace PictureManager
{
    static class ProcessData
    {
        public static void Swap(ref int one, ref int another)
        {
            int temp = one;
            one = another;
            another = temp;
        }

        public static void LimitInterval(ref int value, int minValue, int maxValue)
        {
            if (minValue > maxValue)
                Swap(ref minValue, ref maxValue);

            if (value < minValue)
                value = minValue;
            else if (value > maxValue)
                value = maxValue;
        }
    }
}
